package com.self.springframework.aop;

import com.self.springframework.aop.framework.Advised;
import org.aopalliance.intercept.MethodInterceptor;

/**
 * AOP的配置中心: 存储和管理所有SOP相关的配置信息,包括目标对象{@link com.self.springframework.aop.TargetSource},
 * 拦截器链{@link },
 * 顾问{@link Advised}等
 */
public class AdvisedSupport implements Advised{
    // ProxyConfig
    private boolean proxyTargetClass = false;
    // 被代理的目标对象
    private TargetSource targetSource;
    // 方法的拦截器
    private MethodInterceptor methodInterceptor;
    // 方法的匹配器(检查目标方法是都是符合通知条件)
    private MethodMatcher methodMatcher;

    public TargetSource getTargetSource() {
        return targetSource;
    }

    public void setTargetSource(TargetSource targetSource) {
        this.targetSource = targetSource;
    }

    public MethodInterceptor getMethodInterceptor() {
        return methodInterceptor;
    }

    public void setMethodInterceptor(MethodInterceptor methodInterceptor) {
        this.methodInterceptor = methodInterceptor;
    }

    public MethodMatcher getMethodMatcher() {
        return methodMatcher;
    }

    public void setMethodMatcher(MethodMatcher methodMatcher) {
        this.methodMatcher = methodMatcher;
    }

    public boolean isProxyTargetClass() {
        return proxyTargetClass;
    }

    public void setProxyTargetClass(boolean proxyTargetClass) {
        this.proxyTargetClass = proxyTargetClass;
    }
}
